package praca.impl;

import praca.framework.Sprite;
import praca.framework.SpriteBatcher;
import praca.framework.TextureAtlas;
import praca.framework.TextureGL;
import praca.framework.Vertices;
import praca.interfejsy.Game;
import praca.interfejsy.Screen;
import praca.interfejsy.Texture;
import android.util.Log;

public class SpriteBatcherScreen extends Screen {

	TextureAtlas textureAtlas;
	Texture atlas;
	SpriteBatcher spriteBatcher;
	Sprite aLetter;
	Vertices testVert;

	public SpriteBatcherScreen(Game game) {
		super(game);
		
		

		
	}

	@Override
	public void update(float deltaTime) {
		g.drawColor(1, 1, 1);
		//g.clearTransformations();
		//g.moveTexture(100, 100);
		//g.drawTexture(atlas, testVert);
		//g.clearTransformations();
		spriteBatcher.startBatch();
		spriteBatcher.drawSprite(aLetter, 64, 64, 100, 100);
		spriteBatcher.drawSprite(aLetter, 64, 64, 160, 100);
		spriteBatcher.drawSprite(aLetter, 64, 64, 220, 100);
		spriteBatcher.endBatch();
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub

	}

	@Override
	public void resume() {
		textureAtlas = new TextureAtlas("atlas_liter.png", game);
		spriteBatcher = new SpriteBatcher(textureAtlas, game, 20);
		aLetter = new Sprite(textureAtlas, 0,448,64,512);
		g.setTextureTransparentBackground();
	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

}
